@extends('back.index')
@section('title','作家收入管理-后台管理系统')
@section('mian')
    <div style="font-size:14px;padding:20px;" class="modal-content">
        <h2 class="sub-header power_mian">作家收入管理</h2>
        <div class="table-responsive">
            <table class="table table-striped">
                <tr>
                    <th>收入金额</th>
                    <th>收入来源</th>
                    <th>收入分类</th>
                    <th>收入时间</th>
                    <th>操作</th>
                </tr>
                @if(count($dollar))
                @foreach($dollar as $k)
                <tr>
                    <td>{{$k->sum}}书币</td>
                    <td>《{{$k->bookin}}》</td>
                    <td>
                        @if($k->type == 1)
                        书卷收入
                        @elseif($k->type == 2)
                        打赏收入
                        @else
                        数据丢失
                        @endif
                    </td>
                    <td>{{date('Y-m-d H:i:s',$k->data)}}</td>
                    <td>
                        <a href="{{url('back/writer/money/del/'.$k->id)}}" class="btn btn-info">删除</a>
                    </td>
                </tr>
                @endforeach
                @else
                    <tr>
                        <td colspan="5">
                            <h3 class="book_name" >这位作者暂时还没有收入哦</h3>
                        </td>
                    </tr>
                @endif
            </table>
         <div>
        @if(!empty($dollar))
            {{$dollar->links()}}
        @endif
         </div>
        </div>
    </div>
@endsection